/**
 * author: MaHX
 * date: 2019/8/24/19:41
 * description: 冒泡排序
 **/
public class maopaoSort {
    public static void main(String args[]){
        int[] arrs = new int[]{5,7,9,3,7,6,1,0,4};
        for (int i = 1; i < arrs.length; i++) {
            for (int j = 0; j <arrs.length-i ; j++) {
                if (arrs[j]>arrs[j+1]){
                    int temp = arrs[j];
                    arrs[j] = arrs[j+1];
                    arrs[j+1] = temp;
                }
            }
        }
        for (int i = 0; i < arrs.length; i++) {
            System.out.println(arrs[i]);
        }
    }
}
